package com.dai.zhenfujin.issue.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.dai.zhenfujin.R;
import com.dai.zhenfujin.base.BaseActivity;
import com.dai.zhenfujin.issue.adapter.AddAdapter;
import com.dai.zhenfujin.issue.bean.AddRoomBean;

import java.util.ArrayList;
import java.util.List;

/**
 * 给车添加产品的页面
 */
public class AddVehicleActivity extends BaseActivity {

    private TextView tvTitleName;
    private ImageView imageView;

    private ListView listView;

    private List<AddRoomBean> beans;
    private AddAdapter addAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_add_vehicle);

        tvTitleName = findViewById(R.id.title_textview);
        tvTitleName.setText("选择产品");
        imageView = findViewById(R.id.title_imageview);
        listView = findViewById(R.id.add_room_listview);

        beans = new ArrayList<>();
        beans.add(new AddRoomBean("新车"));
        beans.add(new AddRoomBean("二手车"));
        beans.add(new AddRoomBean("维保"));
        beans.add(new AddRoomBean("车险"));
        beans.add(new AddRoomBean("驾校"));
        beans.add(new AddRoomBean("洗车"));
        beans.add(new AddRoomBean("罚单代缴"));
        beans.add(new AddRoomBean("车品"));






        addAdapter = new AddAdapter(this,beans);
        listView.setAdapter(addAdapter);


        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

    }

}
